package com.sfh.gd.controller;

import cn.dev33.satoken.util.SaResult;
import com.sfh.gd.domain.dto.RuleEditDTO;
import com.sfh.gd.domain.dto.RuleEnableDTO;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * 规则控制器
 */
@RestController
@RequestMapping("/api/game")
@RequiredArgsConstructor
public class WebRuleController {

    /**
     * 编辑赛事规则
     */
    @PostMapping("/editGameRule")
    public SaResult editGameRule(@RequestBody RuleEditDTO data){
        //TODO
        return  SaResult.ok();
    }

    /**
     * 获取赛事规则列表
     */
    @PostMapping("/getGameRuleList")
    public SaResult getGameRuleList(){
        //TODO
        return  SaResult.ok();
    }

    /**
     * 启用赛事规则 停用赛事规则
     */
    @PostMapping("/enableGameRule")
    public SaResult enableGameRule(@RequestBody RuleEnableDTO data){
        //TODO
        return  SaResult.ok();
    }

    /**
     * 获取规则详情
     */
    @GetMapping("/getGameRule")
    public SaResult getGameRule(@RequestParam("ruleId") Long id){
        //TODO
        return  SaResult.ok();
    }

}
